Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add createdAt key to json in registry #532

Merged
merged 7 commits into from
Apr 11, 2024
Merged

feat: Add createdAt key to json in registry #532

merged 7 commits into from
Apr 11, 2024

Conversation

HazAT
Copy link
Member

@HazAT HazAT commented Apr 11, 2024

We want to use the data from our release registry more, one info that is missing today is the timestamp of when something was released.
Yes, in theory, it exists in git, but just for convenience, we want to add a key createdAt into every JSON that the Registry target writes for easier access later.

@HazAT HazAT changed the title feat: Add created key to json in registry feat: Add createdAt key to json in registry Apr 11, 2024
Comment on lines 365 to 369
const updatedManifest: { [key: string]: any } = {
...packageManifest,
version,
};
updatedManifest.createdAt = new Date().toISOString();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to confirm: the manifest is what ends up here, correct? If yes, then I think adding a new field should be safe

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes

Copy link
Member

@Lms24 Lms24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thx!

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
} = {
...packageManifest,
version,
createdAt: new Date().toISOString(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a plan to backfill this data?

any test that needs updating?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a simple unit test to check if property is there
here is the PR to backfill the data for existing files
getsentry/sentry-release-registry#148

Copy link
Member

@asottile-sentry asottile-sentry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HazAT HazAT merged commit 69f6b14 into master Apr 11, 2024
8 checks passed
@HazAT HazAT deleted the add-created branch April 11, 2024 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants